<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"/>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>权限管理</title>
    <link rel="stylesheet" href="css_js/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="css_js/layui/css/layui.css"/>
    <link rel="stylesheet" href="dist/css/common.css"/>
    <link rel="stylesheet" href="dist/css/formcss/normalize.min.css"/>
    <link rel="stylesheet" href="dist/css/formcss/style.css"/>
    <link rel="stylesheet" href="dist/css/jurisdiction.css"/>
</head>

<body ng-app="App" ng-controller="authorityDescriptionCtrl">
<div class="bg_color">
    <nav class="navbar text-center">
        <div class="nav_body">
            <img ng-click="go_back()" class="pull-left btn_top_left" src="dist/images/point/left.png">
            <span class="tit_title">角色权限管理</span>
        </div>
    </nav>
    <div class="container">
        <div class="row">
            <div class="col-xs-12" style="padding-top: 10px">
                <select class="form-control" ng-model="role_id" ng-change="sel_rol()">
                    <option class="role" value="no">选择角色</option>
                    <option class="role" ng-repeat="list in roles" value="{{list.id}}">{{list.name}}</option>
                </select>
            </div>

        </div>
    </div>

    <table class="layui-table">
        <thead>
        <tr>
            <th>项目名称</th>
            <th class="">查看权</th>
            <th>修改权</th>
            <th>增删改设备权</th>
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="item in projects">
            <td>{{item.name}}</td>
            <td>
                <div class="toggle toggle--switch">
                    <input type="checkbox" id="checkboxRightToView{{item.id}}"
                           class="toggle--checkbox  project{{item.id}} pro_checked">
                    <label class="toggle--btn" for="checkboxRightToView{{item.id}}">
                        <span class="toggle--feature"
                              data-label-on="on"
                              data-label-off="off">
                        </span>
                    </label>
                </div>
            </td>
            <td>
                <div class="toggle toggle--switch">
                    <input type="checkbox" id="checkboxRightToModify{{item.id}}"
                           class="toggle--checkbox  project{{item.id}} pro_checked">
                    <label class="toggle--btn" for="checkboxRightToModify{{item.id}}">
                        <span class="toggle--feature"
                              data-label-on="on"
                              data-label-off="off">
                        </span>
                    </label>
                </div>
            </td>
            <td>
                <div class="toggle toggle--switch">
                    <input type="checkbox" id="checkboxRightToOperation{{item.id}}"
                           class="toggle--checkbox  project{{item.id}} pro_checked">
                    <label class="toggle--btn" for="checkboxRightToOperation{{item.id}}">
                        <span class="toggle--feature"
                              data-label-on="on"
                              data-label-off="off">
                        </span>
                    </label>
                </div>
            </td>
        </tr>
    </table>
    <div class="container">
        <div class="row">
            <div class="col-xs-12" >
                <button class="layui-btn layui-btn-normal" style="width: 100%; background-color:#00722e" ng-click="givePermissions()">提交</button>
            </div>
        </div>
    </div>
</div>
<div class="modal fade in" id="infoAlert" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    ×
                </button>
                <h4 class="modal-title">信息</h4>
            </div>
            <div class="modal-body">
                <p>
                    您未选择正确的角色！！！
                </p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" data-dismiss="modal">
                    确认
                </button>
            </div>
        </div>
    </div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
<script src="css_js/js/jquery.min.js"></script>
<script src="css_js/js/angular.min.js"></script>
<script src="css_js/js/angular-cookies.min.js"></script>
<script src="css_js/js/bootstrap.min.js"></script>
<script src="dist/controller/config.js"></script>
<script src="dist/controller/authorityDescriptionCtrl.js"></script>
<script src="css_js/layui/layui.all.js"></script>
<script>
</script>
</body>

</html>